﻿using System;
using System.Collections.Generic;

using E.Model;
using E.BLL;
using E.Enum;
using E.Web.UI.Page;

using X.Common;

namespace E.Web.Teacher.teacher
{
    public partial class View : TeacherBasePage
    {
        public int id;
        public TeacherModel model = new TeacherModel();
        public IList<DictAreaModel> areaList;
        public string area_v;
        public string authoritys, projectName;

        protected override void ShowPage()
        {
            id = XRequest.GetInt("id", -1);

            if (id != -1)
            {
                TeacherBLL bll = new TeacherBLL();
                model = bll.GetTeacherInfo(id);
                areaList = GetTeacherAreaList(teacherid);
                authoritys = EnumClass.GetAuthorityTitle(model.Authority);

                if (model.Authority == EnumTeacherAuthority.Internals)
                {
                    projectName = (new CourseBLL()).GetCertificateNameByID(model.CertificateID);
                }

                IList<int> areaIDList = bll.GetTeacherAreaIDList(model.ID);
                area_v = Convert2String(areaIDList);
            }
            else
            {
                ExecuteJS("alert('服务器忙，请稍后再试'); window.location = '/exam/ExamList.aspx';");
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}
